package demo2;

public class Test {
    public static void drowMap(Shape shape){
        shape.draw();
    }

    /// 用数组打印出来  一个圆，两个长方形，三个三角形
    public static void main(String[] args) {
        Shape shape1 = new Circle();
        Shape shape2 = new Rect();
        Shape shape3 = new Triangle();

        Shape [] strings = {shape1,shape2,shape2,shape3,shape3,shape3};

        for(Shape shape : strings){
            shape.draw();
        }
    }

    public static void main1(String[] args) {
        Circle shape1 = new Circle();
        Rect shape2 = new Rect();
        Triangle shape3 = new Triangle();

        shape1.draw();;
        shape2.draw();
        shape3.draw();

    }
}
